package com.threadmethod.produerstack;

/**
 * @PackageName:com.threadmethod.produerstack
 * @ClassName:ProducerThread
 * @Description: 生产者线程
 * @Author: zhangxiaoyu
 * @date 2021/1/18 14:45
 */
public class ProducerThread extends Thread{

    private MyStack stack;

    public ProducerThread(MyStack stack) {
        this.stack = stack;
    }

    @Override
    public void run() {
        while (true){
            stack.push();
        }
    }
}
